from page.Page import Page
from selenium.webdriver.common.by import By
import time
class Page2(Page):
    fankui_loc=(By.XPATH,"/html/body/div[1]/ul/li[6]/div/a")
    def fankui(self):
        self.click(self.fankui_loc)
    jianyi_loc=(By.XPATH,'/html/body/div[3]/div/div[2]/div/div[2]/div[2]/ul/li[3]')
    dy3_loc=(By.CSS_SELECTOR,'.appeal_title')
    def jianyi(self):
        self.click(self.jianyi_loc)
    def dy3(self):
        self.text(self.dy3_loc)
    miaoshu_loc=(By.ID,'typec_desc')
    def miaoshu(self):
        self.send_keys(self.miaoshu_loc,"贴吧的内容有些是不符合系统的一个规定的")
    tijiaobtn_loc=(By.XPATH,'/html/body/div[3]/div/div[2]/div/div[2]/div[3]/a')
    def tijiaobtn(self):
        self.click(self.tijiaobtn_loc)
    def yewu_baidutieba2(self):
        self.goto("https://tieba.baidu.com/")
        # 隐式等待
        self.driver.implicitly_wait(2)
        self.sousuokuang()
        print(self.dy1())
        # 强制等待
        time.sleep(2)
        self.sousuobtn()
        self.tiebabtn()
